<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if ($this->params->get('filter') || $this->params->get('show_pagination_limit')) : ?>
		<?php if ($this->params->get('show_pagination_limit')) : ?>
			<?php
				echo '&nbsp;&nbsp;&nbsp;'.JText::_('Display Num').'&nbsp;';
				echo $this->pagination->getLimitBox();
			?>
		<?php endif; ?>
<?php endif; ?>
<?php foreach ($this->items as $item) : ?>
		<div class="blog-item">
		<div class="item-inner">
	<?php if ($this->params->get('show_title')) : ?>
	<?php if ($item->access <= $this->user->get('aid', 0)) : ?>
		<h3><a href="<?php echo $item->link; ?>">
			<?php echo $this->escape($item->title); ?></a></h3>
			<?php echo $item->introtext?>
			<a href="<?php echo $item->link; ?>" class="readon">
			<?php echo JText::sprintf('Read more...'); ?></a>
	<?php else : ?>
		<?php
			echo $this->escape($item->title).' : ';
			$link = JRoute::_('index.php?option=com_user&view=login');
			$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
			$fullURL = new JURI($link);
			$fullURL->setVar('return', base64_encode($returnURL));
			$link = $fullURL->toString();
		?>
		<a href="<?php echo $link; ?>">
			<?php echo JText::_( 'Register to read more...' ); ?></a>
	<?php endif; ?>
	<?php endif; ?>
	<?php if ($this->params->get('show_date')) : ?>
		<?php echo $item->created; ?>
	<?php endif; ?>
	<?php if ($this->params->get('show_author')) : ?>
		<?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
	<?php endif; ?>
	<?php if ($this->params->get('show_hits')) : ?>
		<?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
	<?php endif; ?>
	</div>
	</div>
<?php endforeach; ?>
<?php if ($this->params->get('show_pagination')) : ?>
		<?php echo $this->pagination->getPagesLinks(); ?>
		<?php echo $this->pagination->getPagesCounter(); ?>
<?php endif; ?>